/**
 * ChartComponent.java
 */
package com.pluginsacceptor.plugin.chart;

import java.awt.Font;

import javax.swing.JComponent;
import javax.swing.JTabbedPane;

/**
 * The chart component
 * The class implements custom UI object: JTabbedPane with different graphic JPanels
 */
public class ChartComponent extends JTabbedPane {

    /** */
    private static final long serialVersionUID = 1L;

    /**
     * Constructor
     */
    public ChartComponent() {
        super();
        final Font font = new Font("Verdana", Font.PLAIN, 12);
        setFont(font);
    }

    public void addChart(final JComponent component) {
        add("chart" + getComponentCount(), component);
        setSelectedIndex(getComponentCount() - 1);
    }
}
